package top.yueyazhui.data_scope.util;

import org.springframework.security.core.context.SecurityContextHolder;
import top.yueyazhui.data_scope.entity.User;

public class SecurityUtil {

    public static User getLoginUser() {
        User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        return user;
    }
}
